package top.wardyan.wbaseswt.conf.service.impl;

import com.jfinal.aop.Aop;

import top.wardyan.base.db.model.base.BaseNonstandardModel;
import top.wardyan.base.db.service.impl.BaseNonstandardServiceImpl;
import top.wardyan.wbaseswt.conf.service.ISWTBaseNonstandardService;
import top.wardyan.wbaseswt.conf.service.ISysIdService;

public class SWTBaseNonstandardServiceImpl<T extends BaseNonstandardModel<T>>  extends BaseNonstandardServiceImpl<T> implements ISWTBaseNonstandardService<T>{

	private static final cn.hutool.log.Log log = cn.hutool.log.Log.get();
	private static final ISysIdService idService = Aop.get(ISysIdService.class); 
	
	// 
	@Override
	public boolean save(T obj) {
		if(obj != null) {
			Integer sID = obj.getSID();
			if(sID == null || sID <= 0) {
				sID = idService.getId(0, this.getTable(), "sID");
			}
		}
		return super.save(obj);
	}

	
	
	
	
}
